package designpattern.service.impl;

import designpattern.dao.NewsDao;
import designpattern.entity.News;
import designpattern.service.NewsService;

/**
 * @author 吴阳基
 * @datetime 2024/1/6 8:40
 */
public class NewsServiceImpl implements NewsService {
    private NewsDao  newsDao;



    @Override
    public void addNews(News news) {
        newsDao.save(news);
    }

    /**
     * 设置
     * @param newsDao
     */
    public void setNewsDao(NewsDao newsDao) {
        this.newsDao = newsDao;
    }


}
